package cn.lingyangwl.agile.food.core.model.rqrs.order;

import cn.lingyangwl.agile.model.constants.ValidationCons;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * 来自购物车的确认订单请求
 * @author shenguangyang
 */
@Data
public class CartOrderConfirmReq {
    @ApiModelProperty(value = "购物车id")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    @Size(min = 1, message = "购物车最小数量必须大于1")
    private List<Long> cartIds;

    /**
     * @see GoodsType
     */
    @ApiModelProperty(value = "购物车类型")
    @NotNull(message = ValidationCons.NOT_EMPTY)
    private String cartType;

    /**
     * @see DeliveryWay
     */
    @ApiModelProperty(value = "配送方式")
    @NotEmpty(message = ValidationCons.NOT_EMPTY)
    private String deliveryWay;

    @ApiModelProperty(value = "桌号id")
    private Long tableId;
}
